<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<#include "/script.ftl">
<link rel="stylesheet" type="text/css" href="../static/eth/css/policyEdit.css" />
<script type="text/javascript" src="../static/eth/js/ElassBase.js"></script>
<script type="text/javascript" src="../static/eth/js/jElass.js"></script>
<script type="text/javascript" src="../static/eth/js/QueryGrid.js"></script>
<script type="text/javascript" src="../static/eth/js/policyEdit.js"></script>
<script type="text/javascript" src="../static/eth/js/extension.js"></script>
<script type="text/javascript" src="../static/eth/js/PolicyPersistence.js"></script>
<script type="text/javascript" src="../static/eth/js/resume.js"></script>
</head>
<body>
<div class="page-container">
	<form class="form form-horizontal" id="form" action="save" method="post">
	    <#include "/allairports.ftl">
	    <input type="hidden" id="policyId" name="policyId" value="${policy.policyId!}" />
	    <input type="hidden" id="sourcePolicyId" name="sourcePolicyId" value="${policy.sourcePolicyId!}" />
	    <div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
		            <label><span class="c-red">*</span>行程类型</label>
		        </div>
	            <div class="edit_content">
	                <input type="hidden" id="flightType" value="${policy.flightType!''}" class="resume-check"/>
	                <label><input type="checkbox" name="flightType" id="flightType-OW" value="OW" required>单程</label>
                    <label><input type="checkbox" name="flightType" id="flightType-RT" value="RT"><span>往返</span></label>
                    <label id="flightType-error" class="error" for="flightType"></label>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label><span class="c-red">*</span>票本类型</label>
	            </div>
	            <div class="edit_content">
	                <input type="hidden" id="ticketType" value="${policy.ticketType!''}" class="resume-check"/>
	                <label><input type="checkbox" name="ticketType" id="ticketType-BSP" value="BSP" required><span>BSP</span></label>
	                <label><input type="checkbox" name="ticketType" id="ticketType-B2B" value="B2B"><span>B2B</span></label>
	                <label><input type="checkbox" name="ticketType" id="ticketType-overseas" value="overseas"><span>境外电子</span></label>
	                <label id="ticketType-error" class="error" for="ticketType"></label>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label><span class="c-red">*</span>航空公司</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="airline" value="${policy.airline!''}" class="input-text" placeholder="航司二字码" required minlength="2" maxlength="2"/>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label>同时适用的航司</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="airlineShare" value="${policy.airlineShare!''}" class="input-text" placeholder="例：MU/CA"/>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label><span class="c-red">*</span>供应商office</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="officeNo" value="${policy.officeNo!''}" class="input-text" required minlength="6" maxlength="6"/>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label><span class="c-red">*</span>开票office</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="ticketingOfficeNo" value="${policy.ticketingOfficeNo!''}" class="input-text" required minlength="6" maxlength="6"/>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label><span class="c-red">*</span>代理费</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="commision" value="${policy.commision!''}" class="input-text" required number="true"/>
	                <input type="hidden" id="txt_RetreatTicketDiscount"/>
	                <span>%</span>
	                <label id="commision-error" class="error" for="commision"></label>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label><span class="c-red">*</span>奖励</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="reward" value="${policy.reward!''}" class="input-text" required number="true"/>
	                <span>%</span>
	                <label id="reward-error" class="error" for="reward"></label>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label>单程直减</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="owOff" value="${policy.owOff!''}" class="input-text"/>
	                <span>元</span>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label>往返直减</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="rtOff" value="${policy.rtOff!''}" class="input-text"/>
	                <span>元</span>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label>开票费</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="ticketingPrice" value="${policy.ticketingPrice!''}" class="input-text"/>
	                <span>元</span>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label>出票方式</label>
	            </div>
	            <div class="edit_content">
	                <input type="hidden" id="autoTicketingFlag" value="${policy.autoTicketingFlag!''}" class="resume-check"/>
	                <label><input type="checkbox" name="autoTicketingFlag" id="ticketType-Y" value="Y">自动出票</label>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label><span class="c-red">*</span>开票有效期</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="ticketingDateStartStr" id="ticketingDateStartStr" value="${policy.ticketingDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	                <input type="text" name="ticketingDateEndStr" id="ticketingDateEndStr" value="${policy.ticketingDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'ticketingDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label>提前开票天数</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="ticketingAdvance" id="ticketingAdvance" value="${policy.ticketingAdvance!''}" class="input-text">
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label><span class="c-red">*</span>去程有效期</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="outboundTravelDateStartStr" id="outboundTravelDateStartStr" value="${policy.outboundTravelDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	                <input type="text" name="outboundTravelDateEndStr" id="outboundTravelDateEndStr" value="${policy.outboundTravelDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'outboundTravelDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head">
	                <label><span class="c-red">*</span>回城有效期</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="inboundTravelDateStartStr" id="inboundTravelDateStartStr" value="${policy.inboundTravelDateStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	                <input type="text" name="inboundTravelDateEndStr" id="inboundTravelDateEndStr" value="${policy.inboundTravelDateEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'inboundTravelDateStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off" required>
	            </div>
	        </div>
		</div>
		<div style="margin-bottom: 5px;">
		    <input type="hidden" name="departure" id="departure" value="${policy.departure!''}">
		    <input type="hidden" name="departureExclude" id="departureExclude" value="${policy.departureExclude!''}">
		    <input type="hidden" name="departureCabins" id="departureCabins" value="${policy.departureCabins!''}">
		    <input type="hidden" name="arrival" id="arrival" value="${policy.arrival!''}">
		    <input type="hidden" name="arrivalCabins" id="arrivalCabins" value="${policy.arrivalCabins!''}">
		    <input type="hidden" name="arrivalExclude" id="arrivalExclude" value="${policy.arrivalExclude!''}">
		    <input type="hidden" name="transfer" id="transfer" value="${policy.transfer!''}">
		    <input type="hidden" name="journeyType" id="rd_ObTypeNum" value="${policy.journeyType!''}" class="resume-check">
            <div id="dv_ObTypeNum" class="_label_ObTypeNum" style="background-color: #f6f6f6; margin-top: 10px; border-top: 4px solid #eeeced;">
                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                    <tr>
                        <td class="_left">航班类型：
                        </td>
                        <td class="_right1" id="td_ObTypeNum" rd="P"></td>
                    </tr>
                </table>
            </div>
            <div id="dv_InitAirport" style="text-align: center; padding: 10px;">
                
            </div>
            <div id="dv_CitiesC" style="display: none;">
                <div id="dv_DepCity"></div>
                <div id="dv_TransferCity" style="display: none;"></div>
                <div id="dv_ArrCity" style=""></div>
            </div>
        </div>
        <div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label>不适用转机机场</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" id="transferExclude" name="transferExclude" value="${policy.transferExclude!''}" class="input-text" placeholder="例:HKG/PVG"/>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head">
	                <label>适用年龄</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="ageStart" value="${policy.ageStart!''}" class="input-text input-text-sm" placeholder="不限制可不填"/>
	                <span class="ml5">—</span>
	                <input type="text" name="ageEnd" value="${policy.ageEnd!''}" class="input-text input-text-sm" style="margin-left:5px;" placeholder="不限制可不填"/>
	                <span>岁</span>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
	        <div class="edit_item">
	            <div class="edit_head">
	                <label>适用人数</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="travelerCountsStart" value="${policy.travelerCountsStart!''}" class="input-text input-text-sm" placeholder="不限制可不填"/>
	                <span class="ml5">—</span>
	                <input type="text" name="travelerCountsEnd" value="${policy.travelerCountsEnd!''}" class="input-text input-text-sm" style="margin-left:5px;" placeholder="不限制可不填"/>
	                <span>人</span>
	                <input type="hidden" id="travelerCountsExt" value="${policy.travelerCountsExt!''}" class="resume-check"/>
		            <label><input type="checkbox" name="travelerCountsExt" id="travelerCountsExt-1" value="1">仅双数</label>
		            <label><input type="checkbox" name="travelerCountsExt" id="travelerCountsExt-2" value="2">同退改</label>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head">
	                <label>儿童票</label>
	            </div>
			    <div class="edit_content">
			        <input type="hidden" id="child" value="${policy.child!''}" class="resume-check">
			        <input type="hidden" id="childExt" value="${policy.childExt!''}" class="resume-check">
			        <label><input name="child" type="radio" id="child-1" value="1" style="margin-left:20px;">奖励与成人一致</label>
				    <label><input name="child" type="radio" id="child-2" value="2">可开无奖励</label>
				    <label><input name="child" type="radio" id="child-3" value="3"  checked="checked">不可开</label>
				    <label><input name="child" type="radio" id="child-4" value="4">指定奖励</label>
				    <label><input type="text" name="chdReward" value="${policy.chdReward!''}" class="input-text input-text-sm" style="float:none"/>%</label>
				    <label><input type="checkbox" name="childExt" id="childExt-1" value="1">加收手续费</label>
				    <label><input type="text" name="chdServicePrice" value="${policy.chdServicePrice!''}" class="input-text input-text-sm" style="float:none"/>元</label>
				    <label><input type="checkbox" name="childExt" id="childExt-2" value="2">无代理费</label>
				    <label><input type="checkbox" name="childExt" id="childExt-3" value="3">不单开</label>
				    <label><input type="checkbox" name="childExt" id="childExt-4" value="4">不直减</label>
			    </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head">
	                <label>婴儿票</label>
	            </div>
		        <div class="edit_content">
		            <input type="hidden" id="infant" value="${policy.infant!''}" class="resume-check">
		            <input type="hidden" id="infantExt" value="${policy.infantExt!''}" class="resume-check">
		            <label><input name="infant" type="radio" id="infant-1" value="1" style="margin-left:20px;">可开无奖励</label>
				    <label><input name="infant" type="radio" id="infant-2" value="2" checked="checked">不可开</label>
				    <label><input type="checkbox" name="infantExt" id="infantExt-1" value="1">加收手续费</label>
				    <label><input type="text" name="infServicePrice" value="${policy.infServicePrice!''}" class="input-text input-text-sm" style="float:none"/>元</label>
		        </div>
		    </div>
		</div>
		<div class="edit_line" style="height:130px;">
		    <div class="edit_item2">
		        <div class="edit_head">
	                <label>不适用</label>
	            </div>
		        <div class="edit_content">
		            <input type="hidden" id="eligibilityExclude" value="${policy.eligibilityExclude!''}" class="resume-check">
		            <table>
		                <tr>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-A" value="A">留学生</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-B" value="B">移民</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-C" value="C">劳工</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-D" value="D">海员</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-E" value="E">青年</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-R" value="R">老年</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-F" value="F">探亲</label></td>
		                </tr>
		                <tr>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-T" value="T">港澳台</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-M" value="M">外籍</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-U" value="U">非汉字姓名</label></td>
		                </tr>
		                <tr>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-V" value="V">Add-On</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-W" value="W">境外中转</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-N" value="N">OPEN</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-P" value="P">SPA</label></td>
		                </tr>
		                <tr>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-H" value="H">三方协议</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-I" value="I">套票</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-J" value="J">整团</label></td>
		                    <td><label><input type="checkbox" name="eligibilityExclude" id="eligibilityExclude-K" value="K">小团</label></td>
		                </tr>
		            </table>
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
		            <input type="hidden" id="combination" value="${policy.combination!''}" class="resume-check">
	                <label><input type="checkbox" name="combination" id="combination-Y" value="Y">允许混舱1/2RT</label>
	            </div>
		        <div class="edit_content">
		            <input type="hidden" id="combinationExt" value="${policy.combinationExt!''}" class="resume-check">
				    <label><input type="text" name="policyGroup" value="${policy.policyGroup!''}" class="input-text" placeholder="文件编号"/></label>
				    <label><input type="checkbox" name="combinationExt" id="combinationExt-1" value="1">运价基础需一致</label>
				    <label><input type="checkbox" name="combinationExt" id="combinationExt-2" value="2">票面略低</label>
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>TOURCODE中含</label>
	            </div>
		        <div class="edit_content">
				    <label><input type="text" name="tourCodeLimitInclude" value="${policy.tourCodeLimitInclude!''}" class="input-text input-text-l" placeholder="如：CHN5300F/*(*表示任意)"/></label>
				    <label><input type="checkbox" name="tourCodeLimit" id="tourCodeLimit-1" value="Y">无代理费</label>
				    <label><input type="checkbox" name="tourCodeLimit" id="tourCodeLimit-2" value="2">无奖励</label>
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>票面(不含税)</label>
	            </div>
		        <div class="edit_content">
				    <span style="margin-left:10px;">高于</span><input type="text" name="ticketPriceLimitStart" value="${policy.ticketPriceLimitHighPrice!''}" class="input-text" placeholder=""/>
				    <span style="margin-left:10px;">低于</span><input type="text" name="ticketPriceLimitEnd" value="${policy.ticketPriceLimitLowPrice!''}" class="input-text" placeholder=""/>
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>运价基础中含</label>
	            </div>
		        <div class="edit_content">
		            <label><input type="text" name="farebasisLimit" value="${policy.farebasisLimitFlagInclude!''}" class="input-text input-text-l" placeholder="格式：PR/WX/WR/"/></label>
				    <label><input type="radio" name="farebasisLimit" id="farebasisLimitNoCommisionFlag" value="${policy.farebasisLimitNoCommisionFlag!''}" checked>无代理费</label>
				    <label><input type="radio" name="farebasisLimit" id="farebasisLimitNoRewardFlag" value="${policy.farebasisLimitNoRewardFlag!''}">无奖励</label>
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>仅适用运价基础</label>
	            </div>
		        <div class="edit_content">
				    <input type="text" name="farebasis" id="farebasis" value="${policy.farebasis!''}" placeholder="Q3M6CN/A3M5TR或Q3M*(Q3M开头)或*CN(CN结尾)或*R6R*(包含R6R)或J(只适用于单个基础运价)" class="input-text" style="width:677px;">
		        </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head2">
	                <label>去程适用航班</label>
	            </div>
	            <div class="edit_content" style="margin-left:20px;">
	                <input type="text" name="outboundFlight" value="${policy.outboundFlight!''}" class="input-text input-text-l" placeholder="格式：CA123/TG001-TG999/ 可不填" flightNo="true" />
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head2">
	                <label>回程适用航班</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="inboundFlight" value="${policy.inboundFlight!''}" class="input-text input-text-l" placeholder="格式：CA123/TG001-TG999/ 可不填" flightNo="true"/>
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item">
		        <div class="edit_head2">
	                <label>不适用航班</label>
	            </div>
	            <div class="edit_content" style="margin-left:20px;">
	                <input type="text" name="flightExclude" value="${policy.flightExclude!''}" class="input-text input-text-l" placeholder="格式：CA123/CA234/CA7*/CA27*/TG001-TG999/ 不限制可不填" flightNo="true"/>
	            </div>
	        </div>
	        <div class="edit_item">
	            <div class="edit_head2">
	                <label>不适用航线</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="lineExclude" value="${policy.lineExclude!''}" class="input-text input-text-l" placeholder="格式：PEK-ICN/CAN-TPE/" flightLine="true" />
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>去程不适用日期</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="outboundTravelDateExcludeStartStr" id="outboundTravelDateExcludeStartStr" value="${policy.outboundTravelDateExcludeStartStr!''}" onfocus="WdatePicker({minDate:'%y-%M-%d'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off">
	                <input type="text" name="outboundTravelDateExcludeEndStr" id="outboundTravelDateExcludeEndStr" value="${policy.outboundTravelDateExcludeEndStr!''}" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'outboundTravelDateExcludeStartStr\')||\'%y-%M-%d\'}'})" class="input-text Wdate ml-10" placeholder="yyyy-mm-dd" autocomplete="off">
	                <input type="button" id="addOne" value="添加"> 
	            </div>
	            <div id="select-result">
	            </div>
	        </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>政策别名</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="name" id="name" value="${policy.name!''}" class="input-text" style="width:677px;">
	            </div>
		    </div>
		</div>
		<div class="edit_line">
		    <div class="edit_item2">
		        <div class="edit_head2">
	                <label>政策备注</label>
	            </div>
	            <div class="edit_content">
	                <input type="text" name="memo" id="memo" value="${policy.memo!''}" class="input-text" style="width:677px;"> 
	            </div>
		    </div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button class="btn btn-secondary radius" type="submit" id="submit1"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>
</body>
</html>